home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_37092.txt < prev    next >
Text File  |  1991-02-27  |  774b  |  31 lines

  1. -- card: 37092 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10.     struct   Generic_Class:indirect    /* in C++ omit ':indirect' */
  11.     {
  12.         int    init(void);             /* in C++ use 'virtual int init(void)' */
  13.         int    destroy(void);      /* in C++ use 'virtual int destroy(void)' */
  14.     };
  15.  
  16.     int    Generic_Class::init(void)
  17.     {
  18.         return 1;
  19.     }
  20.  
  21.     int    Generic_Class::destroy(void)
  22.     {
  23.         return 1;
  24.     }
  25.  
  26. The init() and destroy() methods will thus be inherited by all classes, although they will likely be overridden frequently.  Their use will be discussed in the next section.
  27.  
  28.  
  29. -- part contents for background part 7
  30. ----- text -----
  31. 110